import 'package:rxdart/rxdart.dart';

void main() {
  var subject = new PublishSubject<int>();

  subject
      .where((val) => val.isOdd)
      .listen((val) => print('This only prints odd numbers: $val'));

  subject
      .where((val) => val.isEven)
      .listen((val) => print('This only prints even numbers: $val'));

  subject.add(1);
  subject.add(2);
  subject.add(3);
}

//EOP
